<template>
  <div>
    <px-row style="height: 64px">
      <px-col :span="24" class="water_col">
        <div class="waterdom borderRidus boxShadow">
          <px-form ref="queryRef" class="custom-form-ui" :model="queryParams" :inline="true" label-width="90px">
            <px-form-item label="统计维度">
              <px-select v-model="queryParams.systemCode" placeholder="请选择" clearable style="width: 210px" filterable>
                <px-option v-for="dict in liquidList" :key="dict.itemValue" :label="dict.itemValue" :value="dict.itemValue" />
              </px-select>
            </px-form-item>
            <px-form-item label="年份">
              <px-date-picker v-model="queryParams.startTime" type="year" placeholder="请选择" />
            </px-form-item>
            <px-form-item label="厂区">
              <px-select v-model="queryParams.systemCode" placeholder="请选择厂区" clearable style="width: 210px" filterable>
                <px-option v-for="dict in liquidList" :key="dict.itemValue" :label="dict.itemValue" :value="dict.itemValue" />
              </px-select>
            </px-form-item>
            <px-button style="margin-top: -17px" type="primary" icon="" @click="handleQuery()">查询</px-button>
            <px-button style="margin-top: -17px" icon="" @click="resetQuery">重置</px-button>
          </px-form>
        </div>
      </px-col>
    </px-row>
    <px-row style="height: 527px; margin-top: 16px">
      <px-col :span="24" class="water_col">
        <div class="waterdom borderRidus boxShadow">
          <modelTitle :title="'碳排放量溯源'" />
          <div class="model_chart" style="margin-top: 16px">
            <chartsUpwChemistry width="'100%'" :height="'380px'" />
          </div>
        </div>
      </px-col>
    </px-row>
    <px-row style="height: 527px; margin-top: 16px">
      <px-col :span="24" class="water_col">
        <div class="waterdom borderRidus boxShadow">
          <modelTitle :title="'碳排放量追踪'" />
          <div class="model_chart" style="margin-top: 16px">
            <chartsUpwChemistry width="'100%'" :height="'380px'" />
          </div>
        </div>
      </px-col>
    </px-row>
  </div>
</template>
<script setup lang="ts">
import modelTitle from "@/views/common/components/modelTitle/index.vue";
import chartsParent from "./components/chartsParent.vue";
import chartswwt from "./components/chartswwt.vue";
import chartsUpwChemistry from "./components/chartsUpwChemistry.vue";
import chartsIndexUpw from "./components/chartsIndexUpw.vue";
import { getCurrentInstance, ref, toRefs, reactive, onMounted } from "vue";
const data = reactive({
  queryParams: {
    indicatorName: "",
    classCode: "",
    systemCode: "",
    indicatorLevel: "",
    startTime: "",
    endTime: "",
    pageNum: 1,
    pageSize: 20
  }
});
const liquidList = [
  {
    itemValue: "x1ca"
  },
  {
    itemValue: "x2ca"
  },
  {
    itemValue: "x3ca"
  }
];
const { queryParams } = toRefs(data);
const handleQuery = () => {};
const resetQuery = () => {};
</script>

<style scoped lang="scss">
.water_col {
  height: 100%;
}

.waterdom {
  width: 100%;
  height: 100%;
  padding: 16px 24px;
  background-color: #fff;
  border-radius: 4px;
}

.first_width {
  width: calc(100% - 16px);
}

.boxShadow {
  box-shadow: 0 0 10px rgb(0 37 86 / 12%);
}

.model_chart {
  position: relative;
  width: 100%;
  height: calc(100% - 40px);

  .co2img {
    position: absolute;
    top: 32px;
    left: 22px;
    width: 32px;
    height: 32px;
  }

  .titlep {
    position: absolute;
    top: 29px;
    left: 70px;
    font-size: 16px;
    font-weight: 400;
    color: #000;
  }

  .titlevalue {
    position: absolute;
    top: 55px;
    left: 70px;

    .titlevalue1 {
      float: left;
      font-size: 20px;
      font-weight: 600;
      line-height: 28px;
      color: #3b82f6;
    }

    .titlevalue1span {
      font-size: 16px;
      font-weight: 400;
      line-height: 22px;
      color: #4f4f4f;
    }

    .titlevalue2 {
      float: left;
      margin-top: 5px;
      margin-left: 20px;
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      color: #000;
    }

    .titlevalue2span {
      display: inline-block;
      margin-left: 8px;
      font-size: 14px;
      line-height: 20px;
      color: #f87171;
    }
  }

  .co2mian {
    position: absolute;
    top: 112px;
    left: 0;
    width: 100%;
    height: 92px;
  }

  .co2mianleft {
    float: left;
    width: 50%;
    height: 100%;

    .co2mianleftp {
      width: calc(100% - 21px);
      height: 22px;
      padding-left: 20px;
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      color: #000;
      border-right: 1px solid #cbcdd8;
    }
  }

  .co2mianright {
    float: left;
    width: 50%;
    height: 100%;

    .co2mianrightp {
      width: calc(100% - 45px);
      height: 22px;
      padding-left: 45px;
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      color: #000;
    }
  }

  .co2mianleftp2 {
    margin-left: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #3b82f6;

    .co2mianleftp2span {
      font-size: 14px;
      font-weight: 400;
      color: #4f4f4f;
    }
  }

  .co2mianleftp3 {
    float: left;
    margin-left: 20px;
    font-size: 14px;
    font-weight: 400;
    color: #000;

    .titlevalue2span {
      display: inline-block;
      margin-left: 8px;
      font-size: 14px;
      line-height: 20px;
      color: #34d399;
    }
  }
}

.percentage-value {
  display: block;
  margin-top: 10px;
  font-size: 26px;
}

.percentage-label {
  display: block;
  margin-top: 10px;
  font-size: 16px;
}

.percentage-value2 {
  display: block;
  margin-top: 10px;
  font-size: 20px;
}

.percentage-label2 {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

.percentage-value3 {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  color: #f00;
}

.percentage-label3 {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: #f00;
}

.jindu1 {
  margin: 24px 0 0 17px;
}

.jindu2 {
  margin: 38px calc((100% - 103px) / 2);
}

.jindu1p {
  width: calc(100% - 24px);
  margin-top: 0;
  font-size: 16px;
  text-align: center;
}

.jindu2p {
  width: 100%;
  margin-top: -40px;
  font-size: 14px;
  text-align: center;
}
</style>
